package org.bee.check;

import org.bee.ResultTool;
import org.bee.check.model.CheckResult;
import org.bee.enums.ResultCode;
import org.bee.model.result.Result;

public class VoCheck {
    public static Result check(Object object){
        Result result = ResultTool.success();
        CheckResult check = ModelCheck.check(object);
        if(!check.isResult()){
            result = ResultTool.fail(ResultCode.PARAM_NOT_VALID);
            result.setMsg(check.getMsg());
        }
        return result;
    }
}
